put FolderPath("Choose a folder please.") into thePath
if thePath = empty then exit mouseUp
if errGlobal Γëá empty then
answer "Error: ΓÇ£" & errGlobal & "ΓÇ¥"
put empty into errGlobal
else
answer "You chose ΓÇ£" & thePath & "ΓÇ¥"
end if
end mouseUp
-- part contents for background part 20
----- text -----
FolderPath displays a modified Standard File dialog to let the user choose a folder. It returns the full path name of the chosen folder, or empty if the CANCEL button is chosen.
In addition to the standard Eject, Drive, Select, and Cancel buttons, the XFCN displays the amount of free space on a volume. Additionally you may supply a prompt string (in parameter two) which will be placed below the file list. If called without any parmeters, ie. FolderName(), the default prompt will be used (Highlight a directory and press "Select").
As with all of our XCMDs and XFCNs, passing a single question mark (FolderName("?") in this case) returns the syntax for the external. Passing an exclamation point (FolderName("!")) returns the copyright information.
-- part contents for background part 38
----- text -----
23/50
-- part contents for background part 42
----- text -----
{ FolderName() XFCN source listing}
{ This is an XFCN that brings up a custom standard file dialog to allow the user to select a folder.}
{ This source file is part of a stack containing all necessary source code and compiled versions of}
{}
{ Written by: Anup Murarka Eric Carlson }
{ ALINK: SKEPTIC ALINK: cyNic }
{ CIS: 76004,3356 }
{}
{ We are part of the Support Tools Development Group, }
{ Apple Computer, Inc. }
{}
{ please DO NOT contack Mac DTS for support of this code! }
{}
{ please DO contact the authors for support of this code! }
{}
{ Send comments, bug reports, requests to any of the above }
{ E-mail addresses or to:}
{}
{ (one of us) }
{ Apple Computer, Inc. }
{ 900 E. Hamilton, Ave. }
{ Campbell, CA 95008 }
{ M/S 72-L }
{}
{ Copyright: © 1989, 1990 by Apple Computer, Inc., all rights reserved. }